import request from '@/router/axios';

// 提交订单  xmbzNos userName
export const createSfOrder = (query)=>{
  return request({
    url:"/api/xmbz-sftc/sftclogisticsorder/createOrder",
    method: 'post',
    params: query
  })
}

// 物流订单列表 
export const logisticsList = (query) => {
  return request({
    url: '/api/xmbz-sftc/sftclogisticsorder/list',
    method: 'get',
    params:query,
  })
}

// 取消发布订单 xmbzNo  cancelCode(退回原因) cancelReason(备注)
export const cancellationOrder = (query) => {
  return request({
    url: '/api/xmbz-sftc/sftclogisticsorder/cancelOrder',
    method: 'get',
    params: query
  })
}

// 日志 
export const showDaytitle = (query) => {
  return request({
    url: '/api/xmbz-sftc/sftclogisticsorderlog/list',
    method: 'get',
    params: query,
  })
}

// 导出 
export const exportList = (query) => {
  return request({
    url: '/api/xmbz-sftc/sftclogisticsorder/export',
    method: 'get',
    params: query,
    responseType: 'blob',
  })
}

/**
 * 新增订单
 * @param {*} data 
 * @returns 
 */
 export const createOrder = (data)=>{
  return request({
    url:"/api/xmbz-sftc/commonlogistics/createOrder",
    method: 'post',
    data
  })
}

/**
 * 达达取消订单
 * @param {*} data 
 * @returns 
 */
 export const dadaCancelOrder = (data)=>{
  return request({
    url:"/api/xmbz-sftc/dadaLogisticsOrder/dadaCancelOrder",
    method: 'post',
    data
  })
}

/**
 * 查询达达物流列表
 * @param {*} params 
 * @returns 
 */
 export const getDadaLogisticsOrderList = (params)=>{
  return request({
    url:"/api/xmbz-sftc/dadaLogisticsOrder/list",
    method: 'get',
    params
  })
}

/**
 * 导出达达物流列表
 * @param {*} params 
 * @returns 
 */
 export const exportDadaLogisticsOrderList = (params)=>{
  return request({
    url:"/api/xmbz-sftc/dadaLogisticsOrder/export",
    method: 'get',
    params,
    responseType: 'blob',
  })
}

/**
 * 获取取消原因
 * @param {*} params 
 * @returns 
 */
 export const getDadaCancelName = (params)=>{
  return request({
    url:"/api/xmbz-sftc/dadaLogisticsOrder/getDadaCancelName",
    method: 'get',
    params
  })
}